package cn.neo.support.syllabus.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Name:课程表课程元素
 * Author: WK（wangkun@xjzhicheng.com)
 * Date: 2016-10-18
 * Describe: PLEASE TO FIXME...
 */
public class ClassCourse implements Parcelable {

    private String id;
    private String syllabusId;
    private String userId;
    private String inTime;
    private String lecturer;
    private String name;
    private List<ClassTime> info;
    private String note;
    protected boolean isEmpty;
    private int backgroundColor;
    private boolean active;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSyllabusId() {
        return syllabusId;
    }

    public void setSyllabusId(String syllabusId) {
        this.syllabusId = syllabusId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getInTime() {
        return inTime;
    }

    public void setInTime(String inTime) {
        this.inTime = inTime;
    }

    public String getLecturer() {
        return lecturer;
    }

    public void setLecturer(String lecturer) {
        this.lecturer = lecturer;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<ClassTime> getInfo() {
        return info;
    }

    public void setInfo(List<ClassTime> info) {
        this.info = info;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public boolean isEmpty() {
        return isEmpty;
    }

    public void setEmpty(boolean empty) {
        isEmpty = empty;
    }

    public int getBackgroundColor() {
        return backgroundColor;
    }

    public void setBackgroundColor(int backgroundColor) {
        this.backgroundColor = backgroundColor;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.inTime);
        dest.writeString(this.name);
        dest.writeString(this.syllabusId);
        dest.writeString(this.lecturer);
        dest.writeString(this.id);
        dest.writeString(this.userId);
        dest.writeTypedList(this.info);
        dest.writeString(this.note);
        dest.writeByte(this.isEmpty ? (byte) 1 : (byte) 0);
        dest.writeInt(this.backgroundColor);
        dest.writeByte(this.active ? (byte) 1 : (byte) 0);
    }

    public ClassCourse() {
    }

    protected ClassCourse(Parcel in) {
        this.inTime = in.readString();
        this.name = in.readString();
        this.syllabusId = in.readString();
        this.lecturer = in.readString();
        this.id = in.readString();
        this.userId = in.readString();
        this.info = in.createTypedArrayList(ClassTime.CREATOR);
        this.note = in.readString();
        this.isEmpty = in.readByte() != 0;
        this.backgroundColor = in.readInt();
        this.active = in.readByte() != 0;
    }

    public static final Creator<ClassCourse> CREATOR = new Creator<ClassCourse>() {
        @Override
        public ClassCourse createFromParcel(Parcel source) {
            return new ClassCourse(source);
        }

        @Override
        public ClassCourse[] newArray(int size) {
            return new ClassCourse[size];
        }
    };
}
